package com.example.demo2302.bean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyConfig {

    @Autowired
    CustomerByAno customer;

    public void setInfo() {
        customer.setId(444);
        customer.setUsername("admin444");
        customer.setPassword("pwd444");
    }

    public void readInfo() {
        System.out.println("id =" + customer.getId() + ",姓名="
                + customer.getUsername() + ",密码=" + customer.getPassword());
    }


//    @Bean
//    public CustomerByAno getCustomer(){
//        CustomerByAno cu = new CustomerByAno();
//        cu.setId(333);
//        cu.setUsername("admin33");
//        cu.setPassword("999999");
//        return  cu;
//
//    }



}
